package com.wudl.govern.service.impl;

import com.wudl.govern.domain.MetaColumn;
import com.wudl.govern.mapper.MetaColumnMapp;
import com.wudl.govern.service.MetaColumnService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 字段 Service
 *
 * @author wudl
 */
@Service
public class MetaColumnServiceImpl implements MetaColumnService {

    @Autowired
    private MetaColumnMapp metaColumnMapp;

    /**
     * 分页查询
     */
    @Override
    public  List<MetaColumn> page(Integer page, Integer size) {
        PageHelper.startPage(page, size);
        return  metaColumnMapp.selectList();
    }

    /**
     * 获取
     */
    @Override
    public MetaColumn getById(Object id) {
        return metaColumnMapp.selectById(id);
    }

    /**
     * 保存
     */
    @Override
    public void save(MetaColumn metaColumn) {
        metaColumnMapp.insert(metaColumn);
    }

    /**
     * 更新
     */
    @Override
    public void updateById(MetaColumn metaColumn) {
        metaColumnMapp.updateById(metaColumn);
    }

    /**
     * 删除
     */
    @Override
    public void removeById(Object id) {
        metaColumnMapp.deleteById(id);
    }

}